package eric.mpab;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		SessionFactory sf = new Configuration().configure().buildSessionFactory();
		Session ss = sf.openSession();

		TestObject to = new TestObject();
		to.setName("Helloooo");

		ss.beginTransaction();
		ss.save(to);
		ss.getTransaction().commit();

		ss.close();
		sf.close();
	}

}
